package behavioral.Iterator.inner;

import behavioral.Iterator.IAggregate;
import behavioral.Iterator.IIterator;

public class Main {
    public static void main(String[] args) {
        Object[] arrSrc = new Object[] {1, 2, 3, 4, 5};
        IAggregate aggregate = new CustomerAggregate(arrSrc);
        IIterator iterator = aggregate.it();
        while (iterator.hasNext()) {
            int iValue = (int) iterator.next();
            System.out.println(iValue);
        }
    }
}
